<template>
  <div class="main-content">
    <main-header></main-header>
    <div class="content-wrapper">
      <slot></slot>
    </div>
  </div>
</template>

<script>
  import MainHeader from './MainHeader';
  import MainFooter from './MainFooter';
  export default {
    components: {
      MainHeader,
      MainFooter
    }
  }
</script>

<style>
  .main-content {
    position: relative;
    margin-left: 240px;
    padding-top: 64px; /* 为顶部导航栏添加内边距 */
    min-height: 100vh;
    background-color: #f0f2f5;
  }
  
  .content-wrapper {
    padding: 20px;
    min-height: calc(100vh - 64px);
    max-height: calc(100vh - 64px); /* 添加最大高度 */
    overflow-y: auto; /* 添加垂直滚动条 */
  }
  
  .main-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
  }
  
  .page-header {
    margin-bottom: 20px;
    padding: 16px 24px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
  }
  
  .page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #1f2d3d;
  }
  
  .page-content {
    padding: 24px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
  }
</style>